package cn.com.nwpu.visual_system.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;

/**
 * @author Hutengzhong
 * @version 1.0.0
 * @title ConfigData
 * @description TODO 配置文件信息
 * @date 2024/4/27 22:21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ConfigData {
    private Integer configId;
    private String configName;
    private String configValue;
    public ConfigData(HashMap parameters){
        if (parameters == null){
            return;
        }else {
            if (parameters.containsKey("configId")) {
                configId = Integer.parseInt((String) parameters.get("configId"));
            }
            if (parameters.containsKey("configName")) {
                configName = (String) parameters.get("configName");
            }
            if (parameters.containsKey("configValue")) {
                configValue = (String) parameters.get("configValue");
            }
        }
    }
}
